#include <stdio.h>
#include <math.h>
int main(int argc, char *argv[]) {

    int n = 0, sum = 0;
    scanf("%d", &n);

    int i = 0;
    while (sum<=n)
    {
        sum += pow(++i, 3);
    }

    printf("%d", i - 1);

    return 0;
}